package com.wyp.demo.pattern.event;

import lombok.Getter;
import lombok.Setter;

import java.util.Objects;

/**
 * @author: Oliver
 * @time: 2020/12/11/21:37
 * 事件
 */
@Getter
@Setter
public class Event {
    private String type;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Event event = (Event) o;
        return type.equals(event.type);
    }

    @Override
    public int hashCode() {
        return Objects.hash(type);
    }
}
